package com.candoit.webapps.pricing.bean.adapters;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

import com.candoit.webapps.pricing.model.Categoria;

public class CategoryConverter extends GenericConverter {

	@Override
	public String getAsString(FacesContext context, UIComponent component,
			Object value) {
		if (value != null){
			int id = ((Categoria)value).getId();
			return (String.valueOf(id));
		}else{
			return null;
		}
	}

}
